package com.sumer.psychology.common.notification;

import javax.transaction.Transactional;

/**
 * 消息发布服务
 * <p/>
 * Created by zhu on 14-8-20.
 */
public class NotificationApplicationService {
    private NotificationPublisher notificationPublisher;

    public NotificationApplicationService(NotificationPublisher aNotificationPublisher) {
        this.notificationPublisher = aNotificationPublisher;
    }

    @Transactional
    public void publishNotifications() {
        notificationPublisher().publishNotifications();
    }

    private NotificationPublisher notificationPublisher() {
        return this.notificationPublisher;
    }
}
